/**
 * 
 */
package com.ternnetwork.core.notice.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;


@Data
@Embeddable
public class NoticeReadLogId implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1013111640016703195L;
	
	@Column(name="USER_ID",nullable=false)
	private long userId;
	
	@Column(name="NOTICE_ID",nullable=false)
	private long noticeId;

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		NoticeReadLogId that = (NoticeReadLogId) o;

		if (userId == that.userId&&noticeId == that.noticeId) return true;

		return false;
	}

	@Override
	public int hashCode() {
		int result = (int) (userId ^ (userId >>> 32));
		result = 31 * result + (int) (noticeId ^ (noticeId >>> 32));
		return result;
	}
}
